[id].vue 86 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451
  1. <template>
  2. <div>
  3. <!-- 页面头部 -->
  4. <HomePageHead></HomePageHead>
  5. <!-- 页面导航 -->
  6. <HomePageNavigation></HomePageNavigation>
  7. <!-- 二级标题-->
  8. <HomeSecondaryHeading :titleName="routeName" :titleData="pageCategory"></HomeSecondaryHeading>
  9. <!-- {{ name }} -->
  10. <!-- 第一层 -->
  11. <div class="farmingPartOne">
  12. <div class="inner">
  13. <div class="innerLeft" v-if="pageData.length >= 1">
  14. <!-- 标题部分 -->
  15. <div class="title">
  16. <h3>
  17. {{ pageData[0].title }}
  18. <span>
  19. <NuxtLink
  20. :to="{ path: `/newsList/${pageData[0].cid}`, query: { catid: pageData[0].cid } }"
  21. target="_blank" v-if="pageData[0]">查看更多</NuxtLink>
  22. </span>
  23. </h3>
  24. </div>
  25. <div class="leftTop">
  26. <div class="leftTopPhoto left">
  27. <!-- PartTwoPhoto -->
  28. <!--当pageData[0].data[0]存在的时候才渲染,如果直接渲染会导致页面找不到属性-->
  29. <NuxtLink
  30. :to="{ path: `/newsDetail/${pageData[0].data[0].id}`, query: { listId: routeId, listName: routeName } }"
  31. target="_blank" v-if="pageData[0].data[0]">
  32. <img :src="pageData[0].data[0].imgurl" v-if="pageData[0].data[0]">
  33. <span v-if="pageData[0].data[0]">{{ pageData[0].data[0].title }}</span>
  34. </NuxtLink>
  35. </div>
  36. <ul class="left">
  37. <li v-for="item in pageData[0].data">
  38. <em></em>
  39. <!-- <NuxtLink :to="`/newsDetail/${item.id}`" target="_blank" >{{item.title}}</NuxtLink> -->
  40. <span>
  41. <NuxtLink
  42. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  43. target="_blank">{{ item.title }}</NuxtLink>
  44. </span>
  45. </li>
  46. </ul>
  47. </div>
  48. <ul class="leftBottom">
  49. <li v-for="item in pageData[0].data2">
  50. <NuxtLink
  51. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  52. target="_blank"><img :src="item.imgurl"></NuxtLink>
  53. <p>
  54. <NuxtLink
  55. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  56. target="_blank">{{ item.title }}</NuxtLink>
  57. </p>
  58. </li>
  59. </ul>
  60. </div>
  61. <div class="innerRight" v-if="pageData.length >= 2">
  62. <!-- 标题部分 -->
  63. <div class="title">
  64. <h3>
  65. {{ pageData[1].title }}
  66. <span>
  67. <NuxtLink
  68. :to="{ path: `/newsList/${pageData[1].cid}`, query: { catid: pageData[1].cid } }"
  69. v-if="pageData[1]" target="_blank">查看更多</NuxtLink>
  70. </span>
  71. <!-- <span>查看更多</span> -->
  72. </h3>
  73. </div>
  74. <!-- 列表 -->
  75. <ul class="rightList">
  76. <li v-for="item in pageData[1].data">
  77. <NuxtLink
  78. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  79. target="_blank">
  80. <img class="left" :src="item.imgurl">
  81. </NuxtLink>
  82. <p class="left">
  83. <NuxtLink
  84. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  85. target="_blank">
  86. {{ item.title }}
  87. </NuxtLink>
  88. </p>
  89. </li>
  90. </ul>
  91. </div>
  92. </div>
  93. </div>
  94. <!-- 三农资讯logo -->
  95. <HomeSannongzixun></HomeSannongzixun>
  96. <!-- 第二层 -->
  97. <div class="farmingPartTwo">
  98. <div class="inner">
  99. <div class="farmer" v-if="pageData.length >= 3">
  100. <!-- 标题部分 -->
  101. <div class="title">
  102. <h3>
  103. {{ pageData[2].title }}
  104. <span>
  105. <NuxtLink
  106. :to="{ path: `/newsList/${pageData[2].cid}`, query: { catid: pageData[2].cid } }"
  107. v-if="pageData[2]" target="_blank">查看更多</NuxtLink>
  108. </span>
  109. </h3>
  110. </div>
  111. <div class="PartTwoPhoto" v-if="pageData[2].data[0]">
  112. <NuxtLink
  113. :to="{ path: `/newsDetail/${pageData[2].data[0].id}`, query: { listId: routeId, listName: routeName } }"
  114. target="_blank">
  115. <img :src="pageData[2].data[0].imgurl">
  116. <span>{{ pageData[2].data[0].title }}</span>
  117. </NuxtLink>
  118. </div>
  119. <ul class="PartTwoList">
  120. <li v-for="item in pageData[2].data">
  121. <em></em>
  122. <NuxtLink
  123. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  124. target="_blank">{{ item.title }}</NuxtLink>
  125. </li>
  126. </ul>
  127. </div>
  128. <div class="farmer" v-if="pageData.length >= 4">
  129. <!-- 标题部分 -->
  130. <div class="title">
  131. <h3>
  132. {{ pageData[3].title }}
  133. <!-- <span>查看更多</span> -->
  134. <span>
  135. <NuxtLink
  136. :to="{ path: `/newsList/${pageData[3].cid}`, query: { catid: pageData[3].cid } }"
  137. v-if="pageData[3]" target="_blank">查看更多</NuxtLink>
  138. </span>
  139. </h3>
  140. </div>
  141. <div class="PartTwoPhoto" v-if="pageData[3].data[0]">
  142. <NuxtLink
  143. :to="{ path: `/newsDetail/${pageData[3].data[0].id}`, query: { listId: routeId, listName: routeName } }"
  144. target="_blank">
  145. <img :src="pageData[3].data[0].imgurl">
  146. <span>{{ pageData[3].data[0].title }}</span>
  147. </NuxtLink>
  148. </div>
  149. <ul class="PartTwoList">
  150. <li v-for="item in pageData[3].data">
  151. <em></em>
  152. <NuxtLink
  153. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  154. target="_blank">{{ item.title }}</NuxtLink>
  155. </li>
  156. </ul>
  157. </div>
  158. <div class="farmer" v-if="pageData.length >= 5">
  159. <!-- 标题部分 -->
  160. <div class="title">
  161. <h3>
  162. {{ pageData[4].title }}
  163. <span>
  164. <NuxtLink
  165. :to="{ path: `/newsList/${pageData[4].cid}`, query: { catid: pageData[4].cid } }"
  166. v-if="pageData[4]" target="_blank">查看更多</NuxtLink>
  167. </span>
  168. </h3>
  169. </div>
  170. <div class="PartTwoPhoto" v-if="pageData[4].data[0]">
  171. <NuxtLink
  172. :to="{ path: `/newsDetail/${pageData[4].data[0].id}`, query: { listId: routeId, listName: routeName } }"
  173. target="_blank">
  174. <img :src="pageData[4].data[0].imgurl">
  175. <span>{{ pageData[4].data[0].title }}</span>
  176. </NuxtLink>
  177. </div>
  178. <ul class="PartTwoList">
  179. <li v-for="item in pageData[4].data">
  180. <em></em>
  181. <NuxtLink
  182. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  183. target="_blank">{{ item.title }}</NuxtLink>
  184. </li>
  185. </ul>
  186. </div>
  187. </div>
  188. </div>
  189. <!-- 三农资讯logo -->
  190. <HomeSannongzixun></HomeSannongzixun>
  191. <!-- 第三层 -->
  192. <div class="zixuntuijian">
  193. <div class="inner">
  194. <div class="innerLeft">
  195. <div class="zixunTop">
  196. <div class="zixunLeft">
  197. <!-- 标题部分 -->
  198. <div class="title">
  199. <h3>
  200. {{ pageData[5].title }}
  201. <span>
  202. <NuxtLink
  203. :to="{ path: `/newsList/${pageData[5].cid}`, query: { catid: pageData[5].cid } }"
  204. v-if="pageData[5]" target="_blank">查看更多</NuxtLink>
  205. </span>
  206. </h3>
  207. </div>
  208. <!-- 图片和文字列表 160 -->
  209. <ul class="photo_text">
  210. <li v-for="(item, index) in pageData[5].data">
  211. <article v-if="index == 0">
  212. <NuxtLink
  213. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  214. target="_blank">
  215. <img :src="item.imgurl" alt="">
  216. </NuxtLink>
  217. <div>
  218. <h5>
  219. <NuxtLink
  220. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  221. target="_blank">{{ item.title }}</NuxtLink>
  222. </h5>
  223. <p>
  224. <span>{{ item.author }}</span>
  225. <span>{{ item.created_at }}</span>
  226. </p>
  227. </div>
  228. </article>
  229. <article v-else>
  230. <em></em>
  231. <NuxtLink
  232. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  233. target="_blank">{{ item.title }}</NuxtLink>
  234. </article>
  235. </li>
  236. </ul>
  237. </div>
  238. <div class="zixunRight">
  239. <!-- 标题部分 -->
  240. <div class="title">
  241. <h3>
  242. {{ pageData[6].title }}
  243. <span>
  244. <NuxtLink
  245. :to="{ path: `/newsList/${pageData[6].cid}`, query: { catid: pageData[6].cid } }"
  246. v-if="pageData[6]" target="_blank">查看更多</NuxtLink>
  247. </span>
  248. </h3>
  249. </div>
  250. <div class="towPic">
  251. <div v-for="(item, index) in pageData[6].data" class="picBox">
  252. <div v-if="index <= 1">
  253. <NuxtLink
  254. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  255. target="_blank">
  256. <img :src="item.imgurl">
  257. </NuxtLink>
  258. </div>
  259. </div>
  260. </div>
  261. <!-- 图片和文字列表 -->
  262. <ul class="photo_text">
  263. <li v-for="(item, index) in pageData[6].data">
  264. <article v-if="index > 1">
  265. <em></em>
  266. <NuxtLink
  267. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  268. target="_blank">{{ item.title }}</NuxtLink>
  269. </article>
  270. </li>
  271. </ul>
  272. </div>
  273. </div>
  274. <div class="zixunBottom">
  275. <img class="left" :src="pageData[7].data[0].imgurl"
  276. v-if="pageData[7].data[0] && hoverStatus == 0">
  277. <img class="left" :src="pageData[7].data[1].imgurl"
  278. v-if="pageData[7].data[0] && hoverStatus == 1">
  279. <img class="left" :src="pageData[7].data[2].imgurl"
  280. v-if="pageData[7].data[0] && hoverStatus == 2">
  281. <img class="left" :src="pageData[7].data[3].imgurl"
  282. v-if="pageData[7].data[0] && hoverStatus == 3">
  283. <img class="left" :src="pageData[7].data[4].imgurl"
  284. v-if="pageData[7].data[0] && hoverStatus == 4">
  285. <img class="left" :src="pageData[7].data[5].imgurl"
  286. v-if="pageData[7].data[0] && hoverStatus == 5">
  287. <ul class="leftList left">
  288. <li v-for="(item, index) in pageData[7].data" @mouseenter="qhPic(index)">
  289. <h4>
  290. <em></em>
  291. <NuxtLink
  292. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  293. target="_blank">{{ item.title }}</NuxtLink>
  294. </h4>
  295. <!-- <p>
  296. <NuxtLink
  297. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  298. target="_blank">{{ item.title }}</NuxtLink>
  299. </p> -->
  300. </li>
  301. </ul>
  302. </div>
  303. </div>
  304. <div class="innerRight">
  305. <!-- 标题部分 -->
  306. <div class="title">
  307. <h3>
  308. {{ pageData[8].title }}
  309. <span>
  310. <NuxtLink
  311. :to="{ path: `/newsList/${pageData[8].cid}`, query: { catid: pageData[8].cid } }"
  312. v-if="pageData[8]" target="_blank">查看更多</NuxtLink>
  313. </span>
  314. </h3>
  315. </div>
  316. <ul class="information">
  317. <li v-for="item in pageData[8].data">
  318. <NuxtLink
  319. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  320. target="_blank">
  321. <img :src="item.imgurl">
  322. </NuxtLink>
  323. <div class="text">
  324. <h5>
  325. <NuxtLink
  326. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  327. target="_blank">{{ item.title }}</NuxtLink>
  328. </h5>
  329. <p>{{ item.author }}</p>
  330. </div>
  331. </li>
  332. </ul>
  333. </div>
  334. </div>
  335. </div>
  336. <!-- 十强称号logo -->
  337. <HomeTopTen></HomeTopTen>
  338. <!-- 第四层 -->
  339. <div class="farming">
  340. <div class="inner">
  341. <div class="innerLeft">
  342. <div class="farmer">
  343. <h3>
  344. {{ pageData[9].title }}
  345. <span>
  346. <NuxtLink
  347. :to="{ path: `/newsList/${pageData[9].cid}`, query: { catid: pageData[9].cid } }"
  348. v-if="pageData[9]" target="_blank">查看更多</NuxtLink>
  349. </span>
  350. </h3>
  351. <ul>
  352. <li v-for="item in pageData[9].data">
  353. <em></em>
  354. <span>
  355. <NuxtLink
  356. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  357. target="_blank">{{ item.title }}</NuxtLink>
  358. </span>
  359. </li>
  360. </ul>
  361. </div>
  362. <div class="farmer">
  363. <h3>
  364. {{ pageData[10].title }}
  365. <span>
  366. <NuxtLink
  367. :to="{ path: `/newsList/${pageData[10].cid}`, query: { catid: pageData[10].cid } }"
  368. target="_blank" v-if="pageData[10]">查看更多</NuxtLink>
  369. </span>
  370. </h3>
  371. <ul>
  372. <li v-for="item in pageData[10].data">
  373. <em></em>
  374. <span>
  375. <NuxtLink
  376. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  377. target="_blank">{{ item.title }}</NuxtLink>
  378. </span>
  379. </li>
  380. </ul>
  381. </div>
  382. </div>
  383. <div class="innerRight">
  384. <!-- 标题部分 -->
  385. <h3>
  386. {{ pageData[11].title }}
  387. <span>
  388. <NuxtLink
  389. :to="{ path: `/newsList/${pageData[11].cid}`, query: { catid: pageData[11].cid } }"
  390. target="_blank" v-if="pageData[11]">查看更多</NuxtLink>
  391. </span>
  392. </h3>
  393. <!-- 轮播图 -->
  394. <div class="banner">
  395. <HomeSmallSwiper :swiperData="pageData[11].data"></HomeSmallSwiper>
  396. </div>
  397. <!-- 轮播图下小图列表 及内容列表 -->
  398. <div class="banner_b_img">
  399. <div class="photo">
  400. <article v-for="(item, index) in pageData[11].data2">
  401. <div class="photoL" v-if="index == 0">
  402. <NuxtLink
  403. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  404. target="_blank">
  405. <img :src="item.imgurl">
  406. <span>{{ item.title }}</span>
  407. </NuxtLink>
  408. </div>
  409. <div class="photoL" v-if="index == 1">
  410. <NuxtLink
  411. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  412. target="_blank">
  413. <img :src="item.imgurl">
  414. <span>{{ item.title }}</span>
  415. </NuxtLink>
  416. </div>
  417. </article>
  418. </div>
  419. </div>
  420. <div class="banner_text_list">
  421. <ul>
  422. <li v-for="item in pageData[11].data3">
  423. <em></em>
  424. <NuxtLink
  425. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  426. target="_blank">
  427. <span>{{ item.title }}</span>
  428. </NuxtLink>
  429. </li>
  430. </ul>
  431. </div>
  432. </div>
  433. </div>
  434. </div>
  435. <!-- 十强称号logo -->
  436. <HomeTopTenTitle></HomeTopTenTitle>
  437. <!-- 第五层 -->
  438. <div class="scienceEducation">
  439. <div class="inner">
  440. <!-- 左侧 -->
  441. <div class="innerLeft">
  442. <!-- <HomeSlider ></HomeSlider> -->
  443. <div class="slider">
  444. <!-- 标题部分 -->
  445. <div class="scienceTitle">
  446. <h5>{{ pageData[12].title }}</h5>
  447. <p class="title">
  448. <span v-if="pageData[12]" @click="qhtabs(1)">
  449. <b v-if="showTabs == 1" class="active">{{ pageData[12].title1 }}</b>
  450. <b v-else class="noSelect">{{ pageData[12].title1 }}</b>
  451. </span>
  452. <span v-if="pageData[12]" @click="qhtabs(2)">
  453. <b v-if="showTabs == 2" class="active">{{ pageData[12].title2 }}</b>
  454. <b v-else class="noSelect">{{ pageData[12].title2 }}</b>
  455. </span>
  456. <span v-if="pageData[12]" @click="qhtabs(3)">
  457. <b v-if="showTabs == 3" class="active">{{ pageData[12].title3 }}</b>
  458. <b v-else class="noSelect">{{ pageData[12].title3 }}</b>
  459. </span>
  460. <span v-if="pageData[12]" @click="qhtabs(4)">
  461. <b v-if="showTabs == 4" class="active">{{ pageData[12].title4 }}</b>
  462. <b v-else class="noSelect">{{ pageData[12].title4 }}</b>
  463. </span>
  464. </p>
  465. </div>
  466. <!-- 标题下内容列表 -->
  467. <div class="box">
  468. <div class="scienceListBox">
  469. <ul class="scienceList" v-if="showTabs == 1">
  470. <li v-for="item in pageData[12].data1">
  471. <!-- <img :src="item.imgurl"> -->
  472. <NuxtLink
  473. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  474. target="_blank"><img :src="item.imgurl"></NuxtLink>
  475. <p>
  476. <NuxtLink
  477. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  478. target="_blank">{{ item.title }}</NuxtLink>
  479. </p>
  480. </li>
  481. </ul>
  482. <ul class="scienceList" v-if="showTabs == 2">
  483. <li v-for="item in pageData[12].data2">
  484. <!-- <img :src="item.imgurl"> -->
  485. <NuxtLink
  486. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  487. target="_blank"><img :src="item.imgurl"></NuxtLink>
  488. <p>
  489. <NuxtLink
  490. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  491. target="_blank">{{ item.title }}</NuxtLink>
  492. </p>
  493. </li>
  494. </ul>
  495. <ul class="scienceList" v-if="showTabs == 3">
  496. <li v-for="item in pageData[12].data3">
  497. <!-- <img :src="item.imgurl"> -->
  498. <NuxtLink
  499. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  500. target="_blank"><img :src="item.imgurl"></NuxtLink>
  501. <p>
  502. <NuxtLink
  503. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  504. target="_blank">{{ item.title }}</NuxtLink>
  505. </p>
  506. </li>
  507. </ul>
  508. <ul class="scienceList" v-if="showTabs == 4">
  509. <li v-for="item in pageData[12].data4">
  510. <img :src="item.imgurl">
  511. <p>
  512. <NuxtLink
  513. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  514. target="_blank">{{ item.title }}</NuxtLink>
  515. </p>
  516. </li>
  517. </ul>
  518. </div>
  519. </div>
  520. </div>
  521. </div>
  522. <!-- 右侧 -->
  523. <div class="innerRight">
  524. <!-- 标题部分 -->
  525. <h3>
  526. {{ pageData[13].title }}
  527. <span>
  528. <NuxtLink
  529. :to="{ path: `/newsList/${pageData[13].cid}`, query: { catid: pageData[13].cid } }"
  530. target="_blank" v-if="pageData[13]">查看更多</NuxtLink>
  531. </span>
  532. </h3>
  533. <ul class="sannongList">
  534. <li v-for="item in pageData[13].data3">
  535. <em></em>
  536. <span>
  537. <NuxtLink
  538. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  539. target="_blank">{{ item.title }}</NuxtLink>
  540. </span>
  541. </li>
  542. </ul>
  543. <!-- 轮播图 -->
  544. <div class="banner">
  545. <HomeSmallSwiper :swiperData="pageData[13].data"></HomeSmallSwiper>
  546. </div>
  547. <!-- 轮播图下小图列表 及内容列表 -->
  548. <div class="banner_b_img">
  549. <div class="photo">
  550. <article v-for="(item, index) in pageData[13].data2">
  551. <div class="photoL" v-if="index == 0">
  552. <NuxtLink
  553. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  554. target="_blank">
  555. <img :src="item.imgurl">
  556. <span>
  557. {{ item.title }}
  558. </span>
  559. </NuxtLink>
  560. </div>
  561. <div class="photoL" v-if="index == 1">
  562. <NuxtLink
  563. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  564. target="_blank">
  565. <img :src="item.imgurl">
  566. <span>
  567. {{ item.title }}
  568. </span>
  569. </NuxtLink>
  570. </div>
  571. </article>
  572. </div>
  573. </div>
  574. </div>
  575. </div>
  576. </div>
  577. <!-- 页脚部分 -->
  578. <HomeFoot></HomeFoot>
  579. </div>
  580. </template>
  581. <script setup>
  582. //获取生命周期
  583. import { onMounted } from 'vue';
  584. //获得跳转过来的id
  585. const route = useRoute();
  586. const routeId = route.params.id; //获得该页面的id
  587. const routeName = route.query.name; //获得该页面的名称
  588. //获取行政部门和地区
  589. const cityid = route.query.cityid;
  590. const depId = route.query.department_id;
  591. //获得axios
  592. const nuxtApp = useNuxtApp();
  593. const axios = nuxtApp.$axios;
  594. // 定义响应式数据
  595. const seoData = ref({
  596. title: '三农资讯网',
  597. description: '默认描述',
  598. keywords: '默认关键词',
  599. image: 'https://example.com/default-image.jpg'
  600. });
  601. const hoverStatus = ref(1)
  602. const qhPic = function (num) {
  603. console.log(num)
  604. hoverStatus.value = num;
  605. }
  606. // 在 onMounted 钩子中获取数据
  607. onMounted(async () => {
  608. try {
  609. const response = await axios.get(`/web/getWebsiteCategoryHead?catid=${routeId}`);
  610. const data = response.data.website_head; // 假设接口返回的数据在 data 字段中
  611. console.log(seoData.value.title)
  612. // 更新 seoData
  613. seoData.value = {
  614. title: data.seo_title,
  615. description: data.seo_description,
  616. keywords: data.seo_keywords,
  617. image: data.seo_image
  618. };
  619. console.log(seoData.value.title)
  620. } catch (error) {
  621. console.error('获取 SEO 数据失败:', error);
  622. // 设置默认值
  623. seoData.value = {
  624. title: '三农资讯网',
  625. description: '默认描述',
  626. keywords: '默认关键词',
  627. image: 'https://example.com/default-image.jpg'
  628. };
  629. }
  630. });
  631. // 监听 seoData 的变化,动态设置 SEO 字段
  632. watch(seoData, (newVal) => {
  633. if (newVal.title) { // 确保 title 有值
  634. useSeoMeta({
  635. title: newVal.title, // 使用动态值
  636. description: newVal.description,
  637. ogTitle: newVal.title,
  638. ogDescription: newVal.description,
  639. ogImage: newVal.image,
  640. twitterTitle: newVal.title,
  641. twitterDescription: newVal.description,
  642. twitterImage: newVal.image,
  643. keywords: newVal.keywords
  644. });
  645. }
  646. }, { immediate: true });
  647. //该页面上所有的导航池 转为动态数据
  648. const pageCategory = ref([]);
  649. //该页面上需要渲染的所有数据
  650. const pageData = ref([
  651. { id: 0, data: [], data2: [], title: "", cid: "" },
  652. { id: 1, data: [], title: "", cid: "" },
  653. { id: 2, data: [], title: "", cid: "" },
  654. { id: 3, data: [], title: "", cid: "" },
  655. { id: 4, data: [], title: "", cid: "" },
  656. { id: 5, data: [], title: "", cid: "" },
  657. { id: 6, data: [], title: "", cid: "" },
  658. { id: 7, data: [], title: "", cid: "" },
  659. { id: 8, data: [], title: "", cid: "" },
  660. { id: 9, data: [], title: "", cid: "" },
  661. { id: 10, data: [], title: "", cid: "" },
  662. { id: 10, data: [], title: "", cid: "" },
  663. {
  664. id: 11,
  665. title: "",
  666. data: [],
  667. data1: [],
  668. data2: [],
  669. data3: [],
  670. data4: [],
  671. category_id1: "",
  672. category_id2: "",
  673. category_id3: "",
  674. category_id4: "",
  675. title1: "",
  676. title2: "",
  677. title3: "",
  678. title4: "",
  679. cid: ""
  680. },
  681. { id: 12, data1: [], data2: [], data3: [], cid: "" },
  682. ])
  683. //第一种情况 直接获得二级导航
  684. //第一步:获得该分类下的所有二级导航
  685. const newCategory = useState("getWebsiteModelCategory", () => ''); //动态数据
  686. //placeid 固定为1
  687. //pid 由上个页面带过来的1级导航id
  688. //num 获得多少个2级导航 取决你的页面显示 上面有几个你就请求几个
  689. const getWebsiteModelCategory = async () => {
  690. try {
  691. const response = await axios.get(`/web/getWebsiteModelCategory?placeid=${1}&pid=${routeId}&num=${14}`);
  692. pageCategory.value = response.data;
  693. //给与板块标题
  694. for (let index in response.data) {
  695. pageData.value[index].title = response.data[index].name
  696. pageData.value[index].cid = response.data[index].category_id
  697. }
  698. console.log(pageData.value)
  699. console.log('pageCategory111111111111111', pageCategory.value)
  700. renderPage();
  701. } catch (error) {
  702. console.error(error);
  703. }
  704. }
  705. //第二种情况 用户搜索的二级导航
  706. const searchCategory = useState("selectWebsiteCategory", () => ''); //动态数据
  707. //placeid 固定为1
  708. //pid 由上个页面带过来的1级导航id
  709. //num 获得多少个2级导航 取决你的页面显示 上面有几个你就请求几个
  710. const selectWebsiteCategory = async () => {
  711. try {
  712. const response = await axios.get(`/web/selectWebsiteCategory?pid=${routeId}&cityid=${cityid}&department_id=${depId}`);
  713. pageCategory.value = response.data;
  714. //给与板块标题
  715. for (let index in response.data) {
  716. pageData.value[index].title = response.data[index].name
  717. }
  718. console.log(pageData.value)
  719. console.log(pageCategory.value)
  720. renderPage2();
  721. } catch (error) {
  722. console.error(error);
  723. }
  724. }
  725. //第二步:获得对应分类下的数据
  726. const renderPage = function () {
  727. console.log("当前获取到:" + pageCategory.value.length + "个导航")
  728. //循环pageCategory.value.length的次数执行getWebsiteArticlesList
  729. for (let i = 0; i <= pageCategory.value.length - 1; i++) {
  730. getWebsiteArticlesList(pageCategory.value[i].category_id, i)
  731. }
  732. }
  733. //第二步:获得搜索对应分类下的数据 - 因为字段名字不一样,这里做了一下区分
  734. const renderPage2 = function () {
  735. console.log("当前获取到:" + pageCategory.value.length + "个导航")
  736. //循环pageCategory.value.length的次数执行getWebsiteArticlesList
  737. for (let i = 0; i <= pageCategory.value.length - 1; i++) {
  738. getWebsiteArticlesList(pageCategory.value[i].id, i)
  739. }
  740. }
  741. //第三步循环获取数据
  742. const getWebsiteArticlesList = async (name, listType) => {
  743. //第一层
  744. //板块1 图文
  745. if (listType == 0) {
  746. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${8}`);
  747. pageData.value[0].data = response.data
  748. const response2 = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${4}&placeid=${9}`);
  749. pageData.value[0].data2 = response2.data
  750. }
  751. //板块2 图文
  752. if (listType == 1) {
  753. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${5}`);
  754. pageData.value[1].data = response.data;
  755. }
  756. //第二层
  757. //板块3 图文
  758. if (listType == 2) {
  759. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${6}`);
  760. pageData.value[2].data = response.data;
  761. }
  762. //板块4 图文
  763. if (listType == 3) {
  764. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${6}`);
  765. pageData.value[3].data = response.data;
  766. }
  767. //板块5 图文
  768. if (listType == 4) {
  769. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${6}`);
  770. pageData.value[4].data = response.data;
  771. }
  772. //第三层
  773. //板块6 图文
  774. if (listType == 5) {
  775. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${4}`);
  776. pageData.value[5].data = response.data;
  777. }
  778. //板块7 图文
  779. if (listType == 6) {
  780. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${5}`);
  781. pageData.value[6].data = response.data;
  782. }
  783. //板块8 图文
  784. if (listType == 7) {
  785. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${5}`);
  786. pageData.value[7].data = response.data;
  787. }
  788. //板块9 图文
  789. if (listType == 8) {
  790. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${4}`);
  791. pageData.value[8].data = response.data;
  792. }
  793. //第四层
  794. //板块10 文字
  795. if (listType == 9) {
  796. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${1}&pagesize=${10}`);
  797. pageData.value[9].data = response.data;
  798. }
  799. //板块11 文字
  800. if (listType == 10) {
  801. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${1}&pagesize=${10}`);
  802. pageData.value[10].data = response.data;
  803. }
  804. //板块12 轮播图 图文 文字
  805. if (listType == 11) {
  806. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${2}&pagesize=${4}`);
  807. pageData.value[11].data = response.data;
  808. const response2 = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${2}`);
  809. pageData.value[11].data2 = response2.data;
  810. const response3 = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${1}&pagesize=${5}`);
  811. pageData.value[11].data3 = response3.data;
  812. }
  813. //第五层
  814. //板块12 多级栏目 判断下面有没有子级 如果有每个取出来 6条图文
  815. if (listType == 12) {
  816. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${10}`);
  817. pageData.value[12].data = response.data;
  818. console.log("第一步获取父级id")
  819. console.log(pageCategory.value[12].children_count)
  820. console.log(pageCategory.value[12].category_id)
  821. //判断一下里面有没有子导航
  822. if (pageCategory.value[12].children_count != 0) {
  823. //开始请求子导航
  824. const response = await axios.get(`/web/getWebsiteModelCategory?placeid=${1}&pid=${pageCategory.value[12].category_id}&num=${100}`);
  825. console.log("第二步获取子级数量")
  826. console.log(response.data.length)
  827. //获得标题
  828. //判断里面有几个
  829. for (let i = 1; i <= response.data.length; i++) {
  830. if (i == 1) {
  831. pageData.value[12].title1 = response.data[0].name
  832. pageData.value[12].category_id1 = response.data[0].category_id
  833. }
  834. if (i == 2) {
  835. pageData.value[12].title2 = response.data[1].name
  836. pageData.value[12].category_id2 = response.data[1].category_id
  837. }
  838. if (i == 3) {
  839. pageData.value[12].title3 = response.data[2].name
  840. pageData.value[12].category_id3 = response.data[2].category_id
  841. }
  842. if (i == 4) {
  843. pageData.value[12].title4 = response.data[3].name
  844. pageData.value[12].category_id4 = response.data[3].category_id
  845. }
  846. }
  847. //获得内容
  848. //第三步:有几个就循环几次
  849. for (let i = 1; i <= pageCategory.value[12].children_count; i++) {
  850. if (i == 1) {
  851. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${pageData.value[12].category_id1}&level=${3}&pagesize=${6}`);
  852. pageData.value[12].data1 = response.data
  853. }
  854. if (i == 2) {
  855. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${pageData.value[12].category_id2}&level=${3}&pagesize=${6}`);
  856. pageData.value[12].data2 = response.data
  857. }
  858. if (i == 3) {
  859. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${pageData.value[12].category_id3}&level=${3}&pagesize=${6}`);
  860. pageData.value[12].data3 = response.data
  861. }
  862. if (i == 4) {
  863. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${pageData.value[12].category_id4}&level=${3}&pagesize=${6}`);
  864. pageData.value[12].data4 = response.data
  865. }
  866. }
  867. }
  868. }
  869. //板块13 轮播图 图文 文字
  870. if (listType == 13) {
  871. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${2}&pagesize=${4}`);
  872. pageData.value[13].data = response.data;
  873. const response2 = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${2}`);
  874. pageData.value[13].data2 = response2.data;
  875. const response3 = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${1}&pagesize=${5}`);
  876. pageData.value[13].data3 = response3.data;
  877. }
  878. }
  879. let scienceTitleList = [
  880. {
  881. id: 1,
  882. title: "农产畅销"
  883. },
  884. {
  885. id: 2,
  886. title: "农业在线"
  887. },
  888. {
  889. id: 3,
  890. title: "农产行情"
  891. },
  892. {
  893. id: 4,
  894. title: "名优特产"
  895. }
  896. ]
  897. //鼠标移入标题时,下方内容会发生变化
  898. let changeUl = (index) => {
  899. // console.log(index);
  900. if (process.browser) {
  901. let scienceListBox = document.querySelector('.scienceListBox');
  902. let titleList = document.querySelectorAll('.title>span>a')
  903. for (let i = 0; i < titleList.length; i++) {
  904. titleList[i].className = ''
  905. }
  906. titleList[index].setAttribute('class', 'current')
  907. if (index == 0) {
  908. scienceListBox.style.left = 0
  909. } else if (index == 1) {
  910. scienceListBox.style.left = "-790px"
  911. } else if (index == 2) {
  912. scienceListBox.style.left = "-1580px"
  913. } else if (index == 3) {
  914. scienceListBox.style.left = "-2370px"
  915. }
  916. }
  917. }
  918. //显示哪个tabs
  919. let showTabs = ref(1)
  920. let qhtabs = function (number) {
  921. console.log(number)
  922. showTabs.value = number
  923. }
  924. //挂载成功钩子函数
  925. onMounted(() => {
  926. //判断一下应该走搜索还是直接走二级分类
  927. console.log(111111)
  928. console.log(cityid)
  929. console.log(cityid != undefined)
  930. console.log(depId != undefined)
  931. if (cityid != undefined || depId != undefined) {
  932. console.log(7777777777)
  933. console.log(cityid)
  934. console.log(depId)
  935. //获得用户搜索的导航
  936. selectWebsiteCategory()
  937. } else {
  938. console.log(888888888)
  939. //直接获得所有二级导航
  940. getWebsiteModelCategory()
  941. }
  942. })
  943. </script>
  944. <style lang="less" scoped>
  945. a {
  946. color: #333333;
  947. }
  948. //农民工part1
  949. .farmingPartOne {
  950. width: 100%;
  951. height: 600px;
  952. .inner {
  953. height: 600px;
  954. .innerLeft {
  955. height: 600px;
  956. .leftTop {
  957. margin-top: 20px;
  958. height: 320px;
  959. .leftTopPhoto {
  960. width: 387px;
  961. height: 320px;
  962. position: relative;
  963. img {
  964. width: 387px;
  965. height: 320px;
  966. }
  967. span {
  968. display: inline-block;
  969. width: 387px;
  970. height: 50px;
  971. background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 1));
  972. color: #FFFFFF;
  973. position: absolute;
  974. bottom: 0;
  975. left: 0;
  976. font-family: Source Han Sans, Source Han Sans;
  977. font-weight: 500;
  978. font-size: 20px;
  979. line-height: 23px;
  980. padding-top: 11px;
  981. padding-left: 13px;
  982. box-sizing: border-box;
  983. white-space: nowrap;
  984. /* 禁止换行 */
  985. overflow: hidden;
  986. /* 隐藏超出部分 */
  987. text-overflow: ellipsis;
  988. /* 超出部分显示省略号 */
  989. }
  990. }
  991. >ul.left {
  992. margin-left: 25px;
  993. width: 362px;
  994. height: 320px;
  995. margin-top: 5px;
  996. >li {
  997. em {
  998. display: inline-block;
  999. width: 8px;
  1000. height: 8px;
  1001. border-radius: 8px;
  1002. background-color: #d9d9d9;
  1003. margin-right: 8px;
  1004. vertical-align: middle;
  1005. }
  1006. width: 362px;
  1007. height: 22px;
  1008. font-family: PingFang SC,
  1009. PingFang SC;
  1010. font-weight: 500;
  1011. font-size: 18px;
  1012. color: #333333;
  1013. line-height: 22px;
  1014. text-align: left;
  1015. font-style: normal;
  1016. text-transform: none;
  1017. margin-bottom: 19px;
  1018. white-space: nowrap;
  1019. /* 禁止换行 */
  1020. overflow: hidden;
  1021. /* 隐藏超出部分 */
  1022. text-overflow: ellipsis;
  1023. /* 超出部分显示省略号 */
  1024. }
  1025. >li:hover {
  1026. a {
  1027. color: #088f04;
  1028. }
  1029. color: #088f04;
  1030. }
  1031. >li:hover>em {
  1032. background-color: #088f04;
  1033. }
  1034. }
  1035. }
  1036. .leftBottom {
  1037. height: 202px;
  1038. margin-top: 21px;
  1039. >li {
  1040. float: left;
  1041. width: 185px;
  1042. height: 202px;
  1043. margin-right: 10px;
  1044. >a {
  1045. >img {
  1046. width: 185px;
  1047. height: 139px;
  1048. }
  1049. }
  1050. >p {
  1051. width: 185px;
  1052. height: 58px;
  1053. padding: 8px 5px 12px;
  1054. box-sizing: border-box;
  1055. background-color: #f5f5f5;
  1056. font-family: PingFang SC, PingFang SC;
  1057. font-weight: 500;
  1058. font-size: 18px;
  1059. color: #333333;
  1060. line-height: 24px;
  1061. text-align: left;
  1062. font-style: normal;
  1063. text-transform: none;
  1064. display: -webkit-box;
  1065. -webkit-box-orient: vertical;
  1066. -webkit-line-clamp: 2;
  1067. /* 限制显示的行数 */
  1068. overflow: hidden;
  1069. text-overflow: ellipsis;
  1070. }
  1071. }
  1072. >li:hover {
  1073. a {
  1074. color: #088f04;
  1075. }
  1076. }
  1077. >li:last-child {
  1078. margin: 0;
  1079. }
  1080. }
  1081. }
  1082. .innerRight {
  1083. .rightList {
  1084. height: 540px;
  1085. margin-top: 20px;
  1086. >li {
  1087. height: 100px;
  1088. margin-bottom: 10px;
  1089. img {
  1090. width: 150px;
  1091. height: 100px;
  1092. }
  1093. >p {
  1094. width: 219px;
  1095. height: 100px;
  1096. display: -webkit-box;
  1097. -webkit-box-orient: vertical;
  1098. -webkit-line-clamp: 4;
  1099. overflow: hidden;
  1100. text-overflow: ellipsis;
  1101. word-break: break-all;
  1102. padding-left: 12px;
  1103. font-family: PingFang SC, PingFang SC;
  1104. font-weight: 400;
  1105. font-size: 16px;
  1106. color: #333333;
  1107. line-height: 24px;
  1108. text-align: left;
  1109. font-style: normal;
  1110. text-transform: none;
  1111. }
  1112. >p:hover {
  1113. box-shadow: 0 0 16px 1px rgba(0, 0, 0, 0.1);
  1114. a {
  1115. color: #088f04;
  1116. }
  1117. }
  1118. }
  1119. }
  1120. }
  1121. }
  1122. }
  1123. //农民工part2
  1124. .farmingPartTwo {
  1125. width: 100%;
  1126. height: 600px;
  1127. .inner {
  1128. width: 1200px;
  1129. height: 600px;
  1130. >.farmer {
  1131. float: left;
  1132. width: 380px;
  1133. height: 600px;
  1134. margin-right: 29px;
  1135. // 农民工part2标题
  1136. >.title {
  1137. width: 380px;
  1138. }
  1139. >.title>h3 {
  1140. height: 36px;
  1141. font-family: Source Han Sans, Source Han Sans;
  1142. font-weight: bold;
  1143. font-size: 24px;
  1144. color: #000000;
  1145. line-height: 28px;
  1146. text-align: left;
  1147. font-style: normal;
  1148. text-transform: none;
  1149. border-bottom: 1px solid #139602;
  1150. }
  1151. >.title>h3>span>a {
  1152. float: right;
  1153. width: 56px;
  1154. height: 20px;
  1155. line-height: 24px;
  1156. font-weight: 400;
  1157. font-size: 14px;
  1158. color: #999999;
  1159. font-style: normal;
  1160. text-transform: none;
  1161. }
  1162. // 农民工part2图片
  1163. .PartTwoPhoto {
  1164. width: 380px;
  1165. height: 280px;
  1166. margin-top: 20px;
  1167. position: relative;
  1168. img {
  1169. width: 380px;
  1170. height: 280px;
  1171. }
  1172. span {
  1173. display: inline-block;
  1174. width: 380px;
  1175. height: 50px;
  1176. background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 1));
  1177. color: #FFFFFF;
  1178. position: absolute;
  1179. bottom: 0;
  1180. left: 0;
  1181. font-family: Source Han Sans, Source Han Sans;
  1182. font-weight: 500;
  1183. font-size: 20px;
  1184. line-height: 23px;
  1185. padding-top: 11px;
  1186. padding-left: 13px;
  1187. box-sizing: border-box;
  1188. white-space: nowrap;
  1189. /* 禁止换行 */
  1190. overflow: hidden;
  1191. /* 隐藏超出部分 */
  1192. text-overflow: ellipsis;
  1193. /* 超出部分显示省略号 */
  1194. }
  1195. }
  1196. //农民工part2文字列表
  1197. .PartTwoList {
  1198. width: 380px;
  1199. height: 263px;
  1200. background-color: #fff;
  1201. box-shadow: 0px 4px 30px 1px rgba(174, 174, 174, 0.25);
  1202. padding-top: 20px;
  1203. box-sizing: border-box;
  1204. >li {
  1205. width: 380px;
  1206. height: 25px;
  1207. line-height: 25px;
  1208. font-family: PingFang SC, PingFang SC;
  1209. font-weight: 500;
  1210. font-size: 18px;
  1211. color: #333333;
  1212. margin-bottom: 16px;
  1213. white-space: nowrap;
  1214. /* 禁止换行 */
  1215. overflow: hidden;
  1216. /* 隐藏超出部分 */
  1217. text-overflow: ellipsis;
  1218. /* 超出部分显示省略号 */
  1219. >em {
  1220. display: inline-block;
  1221. width: 8px;
  1222. height: 8px;
  1223. background-color: #d9d9d9;
  1224. border-radius: 8px;
  1225. margin-left: 19px;
  1226. margin-right: 10px;
  1227. }
  1228. }
  1229. >li:hover {
  1230. color: #139602;
  1231. a {
  1232. color: #088f04;
  1233. }
  1234. }
  1235. >li:hover>em {
  1236. background-color: #139602;
  1237. }
  1238. }
  1239. }
  1240. >.farmer:last-child {
  1241. margin-right: 0;
  1242. }
  1243. }
  1244. }
  1245. //资讯推荐
  1246. .zixuntuijian {
  1247. width: 100%;
  1248. height: 600px;
  1249. .innerLeft {
  1250. // 左侧的上半部分
  1251. .zixunTop {
  1252. height: 286px;
  1253. .zixunLeft,
  1254. .zixunRight {
  1255. float: left;
  1256. width: 380px;
  1257. height: 286px;
  1258. .towPic {
  1259. display: flex;
  1260. width: 380px;
  1261. height: 116px;
  1262. margin-top: 20px;
  1263. .picBox {
  1264. width: 50%;
  1265. text-align: center;
  1266. }
  1267. .picBox:nth-child(3),
  1268. .picBox:nth-child(4),
  1269. .picBox:nth-child(5) {
  1270. display: none;
  1271. }
  1272. img {
  1273. width: 190px;
  1274. height: 120px;
  1275. }
  1276. .picBox:first-child {
  1277. margin-right: 5px;
  1278. }
  1279. }
  1280. // 标题部分
  1281. >.title {
  1282. width: 380px;
  1283. }
  1284. >.title>h3 {
  1285. height: 36px;
  1286. font-family: Source Han Sans, Source Han Sans;
  1287. font-weight: bold;
  1288. font-size: 24px;
  1289. color: #000000;
  1290. line-height: 28px;
  1291. text-align: left;
  1292. font-style: normal;
  1293. text-transform: none;
  1294. border-bottom: 1px solid #139602;
  1295. }
  1296. >.title>h3>span {
  1297. float: right;
  1298. width: 56px;
  1299. height: 20px;
  1300. line-height: 24px;
  1301. font-weight: 400;
  1302. font-size: 14px;
  1303. color: #999999;
  1304. font-style: normal;
  1305. text-transform: none;
  1306. }
  1307. .photo_text {
  1308. article {
  1309. white-space: nowrap;
  1310. /* 禁止换行 */
  1311. overflow: hidden;
  1312. /* 隐藏超出部分 */
  1313. text-overflow: ellipsis;
  1314. /* 超出部分显示省略号 */
  1315. li {
  1316. white-space: nowrap;
  1317. /* 禁止换行 */
  1318. overflow: hidden;
  1319. /* 隐藏超出部分 */
  1320. text-overflow: ellipsis;
  1321. /* 超出部分显示省略号 */
  1322. a:hover {
  1323. color: #088f04;
  1324. }
  1325. }
  1326. li:hover {
  1327. color: #088f04;
  1328. a {
  1329. color: #088f04;
  1330. }
  1331. }
  1332. img {
  1333. width: 100px;
  1334. }
  1335. }
  1336. li {
  1337. width: 380px;
  1338. height: 25px;
  1339. font-family: PingFang SC, PingFang SC;
  1340. font-weight: 500;
  1341. font-size: 18px;
  1342. color: #333333;
  1343. line-height: 21px;
  1344. text-align: left;
  1345. font-style: normal;
  1346. text-transform: none;
  1347. margin-bottom: 9px;
  1348. em {
  1349. display: inline-block;
  1350. width: 8px;
  1351. height: 8px;
  1352. border-radius: 8px;
  1353. margin-right: 10px;
  1354. background-color: #d9d9d9;
  1355. }
  1356. }
  1357. }
  1358. }
  1359. // 左侧的资讯推荐的左半部分
  1360. .zixunLeft {
  1361. margin-right: 30px;
  1362. .photo_text {
  1363. li:first-child {
  1364. width: 380px;
  1365. height: 120px;
  1366. margin-top: 20px;
  1367. margin-bottom: 16px;
  1368. position: relative;
  1369. img {
  1370. float: left;
  1371. width: 160px;
  1372. height: 120px;
  1373. }
  1374. div {
  1375. float: left;
  1376. width: 220px;
  1377. height: 120px;
  1378. padding-left: 15px;
  1379. padding-top: 6px;
  1380. box-sizing: border-box;
  1381. background-color: #f6f6f6;
  1382. h5 {
  1383. width: 200px;
  1384. height: 54px;
  1385. white-space: nowrap;
  1386. overflow: hidden;
  1387. text-overflow: ellipsis;
  1388. font-family: Source Han Sans, Source Han Sans;
  1389. font-weight: 500;
  1390. font-size: 18px;
  1391. color: #333333;
  1392. line-height: 26px;
  1393. text-align: left;
  1394. font-style: normal;
  1395. text-transform: none;
  1396. }
  1397. p {
  1398. width: 200px;
  1399. height: 22px;
  1400. line-height: 20px;
  1401. position: absolute;
  1402. bottom: 5px;
  1403. right: 0;
  1404. span {
  1405. display: inline-block;
  1406. width: 75px;
  1407. height: 18px;
  1408. font-family: Source Han Sans, Source Han Sans;
  1409. font-weight: 400;
  1410. font-size: 12px;
  1411. color: #999999;
  1412. text-align: left;
  1413. line-height: 14px;
  1414. font-style: normal;
  1415. text-transform: none;
  1416. }
  1417. span:last-child {
  1418. width: 90px;
  1419. text-align: right;
  1420. }
  1421. }
  1422. }
  1423. }
  1424. >li {
  1425. width: 380px;
  1426. height: 25px;
  1427. font-family: PingFang SC, PingFang SC;
  1428. font-weight: 500;
  1429. font-size: 18px;
  1430. color: #333333;
  1431. line-height: 21px;
  1432. text-align: left;
  1433. font-style: normal;
  1434. text-transform: none;
  1435. margin-bottom: 9px;
  1436. em {
  1437. display: inline-block;
  1438. width: 8px;
  1439. height: 8px;
  1440. border-radius: 8px;
  1441. margin-right: 10px;
  1442. background-color: #d9d9d9;
  1443. }
  1444. }
  1445. }
  1446. }
  1447. // 左侧的资讯推荐的右半部分
  1448. .zixunRight {
  1449. width: 380px;
  1450. height: 229px;
  1451. .photo_text {
  1452. margin-top: 20px;
  1453. >li:nth-child(1) {
  1454. display: none;
  1455. }
  1456. >li:nth-child(2) {
  1457. display: none;
  1458. }
  1459. }
  1460. }
  1461. }
  1462. //左侧的下半部分
  1463. .zixunBottom {
  1464. width: 790px;
  1465. height: 280px;
  1466. margin-top: 40px;
  1467. img {
  1468. width: 498px;
  1469. height: 280px;
  1470. }
  1471. >.leftList {
  1472. width: 290px;
  1473. height: 280px;
  1474. background-color: #f6f6f6;
  1475. padding: 11px 26px 6px 20px;
  1476. box-sizing: border-box;
  1477. >li {
  1478. width: 296px;
  1479. height: 35px;
  1480. line-height: 35px;
  1481. color: #666666;
  1482. font-size: 14px;
  1483. margin-bottom: 18px;
  1484. h4 {
  1485. font-family: Source Han Sans, Source Han Sans;
  1486. height: 35px;
  1487. line-height: 35px;
  1488. font-size: 18px;
  1489. font-weight: 400;
  1490. white-space: nowrap;
  1491. /* 禁止换行 */
  1492. overflow: hidden;
  1493. /* 隐藏超出部分 */
  1494. text-overflow: ellipsis;
  1495. /* 超出部分显示省略号 */
  1496. color: #333333;
  1497. width: 260px;
  1498. em {
  1499. display: inline-block;
  1500. width: 8px;
  1501. height: 8px;
  1502. background-color: #333333;
  1503. border-radius: 8px;
  1504. margin-right: 5px;
  1505. }
  1506. }
  1507. p {
  1508. width: 249px;
  1509. height: 48px;
  1510. line-height: 24px;
  1511. padding-left: 14px;
  1512. display: -webkit-box;
  1513. -webkit-box-orient: vertical;
  1514. -webkit-line-clamp: 2;
  1515. /* 限制显示的行数 */
  1516. overflow: hidden;
  1517. text-overflow: ellipsis;
  1518. }
  1519. }
  1520. >li:hover,
  1521. >li:hover>h4>a,
  1522. >li:hover>p>a {
  1523. color: #088f04;
  1524. }
  1525. >li:hover>h4>em {
  1526. background-color: #088f04;
  1527. }
  1528. }
  1529. }
  1530. }
  1531. .innerRight {
  1532. .information {
  1533. width: 380px;
  1534. margin-top: 20px;
  1535. >li {
  1536. width: 380px;
  1537. height: 120px;
  1538. margin-bottom: 21px;
  1539. img {
  1540. float: left;
  1541. width: 160px;
  1542. height: 120px;
  1543. }
  1544. .text {
  1545. float: left;
  1546. width: 220px;
  1547. height: 120px;
  1548. padding-left: 15px;
  1549. box-sizing: border-box;
  1550. >h5 {
  1551. width: 199px;
  1552. height: 49px;
  1553. display: -webkit-box;
  1554. -webkit-box-orient: vertical;
  1555. -webkit-line-clamp: 2;
  1556. overflow: hidden;
  1557. padding-top: 6px;
  1558. font-family: PingFang SC, PingFang SC;
  1559. font-weight: 600;
  1560. font-size: 18px;
  1561. color: #333333;
  1562. line-height: 26px;
  1563. text-align: left;
  1564. font-style: normal;
  1565. text-transform: none;
  1566. }
  1567. >p {
  1568. width: 198px;
  1569. height: 20px;
  1570. display: -webkit-box;
  1571. -webkit-box-orient: vertical;
  1572. -webkit-line-clamp: 2;
  1573. overflow: hidden;
  1574. text-overflow: ellipsis;
  1575. word-break: break-all;
  1576. margin-top: 16px;
  1577. font-family: PingFang SC, PingFang SC;
  1578. font-weight: 400;
  1579. font-size: 14px;
  1580. color: #666666;
  1581. line-height: 24px;
  1582. text-align: left;
  1583. font-style: normal;
  1584. text-transform: none;
  1585. margin-top: 40px;
  1586. }
  1587. }
  1588. .text:hover {
  1589. box-shadow: 0 0 16px 1px rgba(0, 0, 0, 0.1);
  1590. background-color: #fff;
  1591. h5 {
  1592. a {
  1593. color: #088f04;
  1594. }
  1595. }
  1596. p {
  1597. color: #088f04;
  1598. }
  1599. }
  1600. }
  1601. }
  1602. }
  1603. }
  1604. // 农民工
  1605. .farming {
  1606. width: 100%;
  1607. height: 605px;
  1608. // 左侧
  1609. .innerLeft {
  1610. width: 790px;
  1611. height: 605px;
  1612. margin-right: 21px;
  1613. // background-color: #ccc;
  1614. .farmer {
  1615. width: 790px;
  1616. height: 312px;
  1617. >h3 {
  1618. height: 36px;
  1619. font-family: Source Han Sans, Source Han Sans;
  1620. font-weight: bold;
  1621. font-size: 24px;
  1622. color: #000000;
  1623. line-height: 28px;
  1624. text-align: left;
  1625. font-style: normal;
  1626. text-transform: none;
  1627. border-bottom: 1px solid #139602;
  1628. >span {
  1629. float: right;
  1630. width: 56px;
  1631. height: 20px;
  1632. line-height: 24px;
  1633. font-weight: 400;
  1634. font-size: 14px;
  1635. color: #999999;
  1636. font-style: normal;
  1637. text-transform: none;
  1638. }
  1639. }
  1640. >ul {
  1641. margin-top: 20px;
  1642. >li {
  1643. float: left;
  1644. width: 362px;
  1645. height: 22px;
  1646. font-weight: 500;
  1647. font-size: 18px;
  1648. color: #333333;
  1649. line-height: 21px;
  1650. text-align: left;
  1651. margin-bottom: 29px;
  1652. margin-right: 27px;
  1653. white-space: nowrap;
  1654. /* 禁止换行 */
  1655. overflow: hidden;
  1656. /* 隐藏超出部分 */
  1657. text-overflow: ellipsis;
  1658. /* 超出部分显示省略号 */
  1659. >em {
  1660. display: inline-block;
  1661. width: 8px;
  1662. height: 8px;
  1663. background-color: #d9d9d9;
  1664. border-radius: 4px;
  1665. margin: 5px 8px 6px;
  1666. vertical-align: middle;
  1667. }
  1668. }
  1669. >li:hover {
  1670. color: #139602;
  1671. a {
  1672. color: #139602;
  1673. }
  1674. }
  1675. }
  1676. }
  1677. .farmerbottom {
  1678. width: 790px;
  1679. height: 280px;
  1680. img {
  1681. width: 498px;
  1682. height: 280px;
  1683. }
  1684. >.leftList {
  1685. width: 290px;
  1686. height: 280px;
  1687. background-color: #f6f6f6;
  1688. padding: 11px 26px 6px 20px;
  1689. box-sizing: border-box;
  1690. >li {
  1691. width: 296px;
  1692. height: 75px;
  1693. color: #666666;
  1694. font-size: 14px;
  1695. margin-bottom: 18px;
  1696. h4 {
  1697. font-family: Source Han Sans, Source Han Sans;
  1698. height: 27px;
  1699. line-height: 21px;
  1700. font-size: 18px;
  1701. color: #333333;
  1702. em {
  1703. display: inline-block;
  1704. width: 8px;
  1705. height: 8px;
  1706. background-color: #333333;
  1707. border-radius: 8px;
  1708. }
  1709. }
  1710. p {
  1711. width: 249px;
  1712. height: 48px;
  1713. line-height: 24px;
  1714. padding-left: 14px;
  1715. }
  1716. }
  1717. >li:hover,
  1718. >li:hover>h4 {
  1719. color: #088f04;
  1720. }
  1721. >li:hover>h4>em {
  1722. background-color: #088f04;
  1723. }
  1724. }
  1725. }
  1726. }
  1727. // 右侧
  1728. .innerRight {
  1729. width: 380px;
  1730. height: 605px;
  1731. // 标题部分
  1732. >h3 {
  1733. height: 36px;
  1734. font-family: Source Han Sans, Source Han Sans;
  1735. font-weight: bold;
  1736. font-size: 24px;
  1737. color: #000000;
  1738. line-height: 28px;
  1739. text-align: left;
  1740. font-style: normal;
  1741. text-transform: none;
  1742. border-bottom: 1px solid #139602;
  1743. >span {
  1744. float: right;
  1745. width: 56px;
  1746. height: 20px;
  1747. line-height: 24px;
  1748. font-weight: 400;
  1749. font-size: 14px;
  1750. color: #999999;
  1751. font-style: normal;
  1752. text-transform: none;
  1753. }
  1754. }
  1755. // 轮播图
  1756. .banner {
  1757. width: 380px;
  1758. height: 214px;
  1759. margin-top: 20px;
  1760. }
  1761. .banner_b_img {
  1762. // 图片部分
  1763. .photo {
  1764. height: 104px;
  1765. margin-top: 10px;
  1766. display: flex;
  1767. }
  1768. .photoL,
  1769. .photoR {
  1770. float: left;
  1771. width: 185px;
  1772. height: 104px;
  1773. position: relative;
  1774. img {
  1775. width: 185px;
  1776. height: 104px;
  1777. }
  1778. span {
  1779. position: absolute;
  1780. top: 0;
  1781. left: 0;
  1782. display: inline-block;
  1783. padding-left: 7px;
  1784. box-sizing: border-box;
  1785. width: 185px;
  1786. height: 22px;
  1787. background-color: rgba(0, 0, 0, 0.5);
  1788. font-weight: 500px;
  1789. font-size: 14px;
  1790. color: #FFFFFF;
  1791. line-height: 22px;
  1792. white-space: nowrap;
  1793. /* 禁止换行 */
  1794. overflow: hidden;
  1795. /* 隐藏超出部分 */
  1796. text-overflow: ellipsis;
  1797. /* 超出部分显示省略号 */
  1798. }
  1799. }
  1800. .photoL {
  1801. margin-right: 10px;
  1802. }
  1803. }
  1804. .banner_text_list {
  1805. ul {
  1806. width: 380px;
  1807. height: 186px;
  1808. margin-top: 30px;
  1809. >li {
  1810. a {
  1811. height: 22px;
  1812. font-size: 16px;
  1813. &:hover {
  1814. color: #139609;
  1815. }
  1816. }
  1817. height: 22px;
  1818. padding-bottom: 16px;
  1819. white-space: nowrap;
  1820. /* 禁止换行 */
  1821. overflow: hidden;
  1822. /* 隐藏超出部分 */
  1823. text-overflow: ellipsis;
  1824. /* 超出部分显示省略号 */
  1825. >strong {
  1826. display: inline-block;
  1827. width: 24px;
  1828. height: 24px;
  1829. line-height: 24px;
  1830. background-color: #cecece;
  1831. padding-left: 6px;
  1832. box-sizing: border-box;
  1833. font-family: Source Han Sans, Source Han Sans;
  1834. font-weight: 500;
  1835. font-size: 18px;
  1836. color: #FFFFFF;
  1837. font-style: normal;
  1838. text-transform: none;
  1839. }
  1840. >em {
  1841. display: inline-block;
  1842. width: 6px;
  1843. height: 6px;
  1844. border-radius: 10px;
  1845. border: 2px solid #8CBA86;
  1846. margin-right: 10px;
  1847. }
  1848. >span {
  1849. width: 380px;
  1850. height: 22px;
  1851. font-family: PingFang SC, PingFang SC;
  1852. font-weight: 500;
  1853. font-size: 18px;
  1854. color: #333333;
  1855. line-height: 21px;
  1856. text-align: left;
  1857. font-style: normal;
  1858. text-transform: none;
  1859. }
  1860. >span:hover {
  1861. color: #139609;
  1862. }
  1863. }
  1864. }
  1865. }
  1866. }
  1867. }
  1868. //三农科教
  1869. .scienceEducation {
  1870. height: 600px;
  1871. margin-bottom: 76px;
  1872. .innerLeft,
  1873. .innerRight {
  1874. float: left;
  1875. }
  1876. // 左侧
  1877. .innerLeft {
  1878. width: 790px;
  1879. height: 616px;
  1880. margin-right: 21px;
  1881. }
  1882. // 右侧
  1883. .innerRight {
  1884. width: 380px;
  1885. height: 600px;
  1886. // 标题部分
  1887. >h3 {
  1888. height: 36px;
  1889. font-family: Source Han Sans, Source Han Sans;
  1890. font-weight: bold;
  1891. font-size: 24px;
  1892. color: #000000;
  1893. line-height: 28px;
  1894. text-align: left;
  1895. font-style: normal;
  1896. text-transform: none;
  1897. border-bottom: 1px solid #139602;
  1898. >span {
  1899. float: right;
  1900. width: 56px;
  1901. height: 20px;
  1902. line-height: 24px;
  1903. font-weight: 400;
  1904. font-size: 14px;
  1905. color: #999999;
  1906. font-style: normal;
  1907. text-transform: none;
  1908. }
  1909. }
  1910. ul.sannongList {
  1911. width: 380px;
  1912. height: 186px;
  1913. >li {
  1914. height: 22px;
  1915. padding-top: 16px;
  1916. white-space: nowrap;
  1917. /* 禁止换行 */
  1918. overflow: hidden;
  1919. /* 隐藏超出部分 */
  1920. text-overflow: ellipsis;
  1921. /* 超出部分显示省略号 */
  1922. >strong {
  1923. display: inline-block;
  1924. width: 24px;
  1925. height: 24px;
  1926. line-height: 24px;
  1927. background-color: #cecece;
  1928. padding-left: 6px;
  1929. box-sizing: border-box;
  1930. font-family: Source Han Sans, Source Han Sans;
  1931. font-weight: 500;
  1932. font-size: 18px;
  1933. color: #FFFFFF;
  1934. font-style: normal;
  1935. text-transform: none;
  1936. }
  1937. >em {
  1938. display: inline-block;
  1939. width: 6px;
  1940. height: 6px;
  1941. border-radius: 10px;
  1942. border: 2px solid #8CBA86;
  1943. }
  1944. >span {
  1945. width: 380px;
  1946. height: 22px;
  1947. font-family: PingFang SC, PingFang SC;
  1948. font-weight: 500;
  1949. font-size: 18px;
  1950. color: #333333;
  1951. line-height: 21px;
  1952. text-align: left;
  1953. font-style: normal;
  1954. text-transform: none;
  1955. padding-left: 9px;
  1956. }
  1957. >span:hover {
  1958. color: #139609;
  1959. a {
  1960. color: #088f04;
  1961. }
  1962. }
  1963. }
  1964. }
  1965. // 轮播图
  1966. .banner {
  1967. width: 380px;
  1968. height: 214px;
  1969. margin-top: 45px;
  1970. }
  1971. .banner_b_img {
  1972. // 图片部分
  1973. .photo {
  1974. height: 104px;
  1975. margin-top: 10px;
  1976. display: flex;
  1977. }
  1978. .photoL,
  1979. .photoR {
  1980. float: left;
  1981. width: 185px;
  1982. height: 104px;
  1983. position: relative;
  1984. img {
  1985. width: 185px;
  1986. height: 104px;
  1987. }
  1988. span {
  1989. position: absolute;
  1990. top: 0;
  1991. left: 0;
  1992. display: inline-block;
  1993. padding-left: 7px;
  1994. box-sizing: border-box;
  1995. width: 185px;
  1996. height: 22px;
  1997. background-color: rgba(0, 0, 0, 0.5);
  1998. font-weight: 500px;
  1999. font-size: 14px;
  2000. color: #FFFFFF;
  2001. line-height: 22px;
  2002. white-space: nowrap;
  2003. /* 禁止换行 */
  2004. overflow: hidden;
  2005. /* 隐藏超出部分 */
  2006. text-overflow: ellipsis;
  2007. /* 超出部分显示省略号 */
  2008. a {
  2009. color: #fff;
  2010. }
  2011. }
  2012. }
  2013. .photoL {
  2014. margin-right: 10px;
  2015. }
  2016. }
  2017. }
  2018. }
  2019. // 标题
  2020. .scienceTitle {
  2021. height: 37px;
  2022. h5 {
  2023. float: left;
  2024. width: 96px;
  2025. height: 34px;
  2026. font-family: PingFang SC, PingFang SC;
  2027. font-weight: 600;
  2028. font-size: 24px;
  2029. color: #000000;
  2030. line-height: 28px;
  2031. text-align: left;
  2032. font-style: normal;
  2033. text-transform: none;
  2034. margin-right: 20px;
  2035. }
  2036. >p {
  2037. float: left;
  2038. height: 37px;
  2039. line-height: 30px;
  2040. display: flex;
  2041. >span {
  2042. display: inline-block;
  2043. //height: 20px;
  2044. line-height: 20px;
  2045. text-align: center;
  2046. margin: 4px 0px 3px;
  2047. padding: 0 20px;
  2048. //border-right: 1px solid #ccc;
  2049. font-weight: 500;
  2050. font-size: 20px;
  2051. cursor: pointer;
  2052. padding-bottom: 11px;
  2053. // >a {
  2054. // display: inline-block;
  2055. // padding-bottom: 11px;
  2056. // font-family: PingFang SC, PingFang SC;
  2057. // font-weight: 500;
  2058. // font-size: 20px;
  2059. // color: #666666;
  2060. // line-height: 20px;
  2061. // font-style: normal;
  2062. // text-transform: none;
  2063. // box-sizing: border-box;
  2064. // }
  2065. .current {
  2066. color: #139602;
  2067. border-bottom: 1px solid #139602;
  2068. }
  2069. }
  2070. >span:nth-child(4) {
  2071. border-right: none;
  2072. }
  2073. >span:hover>a {
  2074. color: #139602;
  2075. border-bottom: 1px solid #139602;
  2076. }
  2077. }
  2078. }
  2079. .box {
  2080. width: 790px;
  2081. height: 570px;
  2082. position: relative;
  2083. overflow: hidden;
  2084. }
  2085. .fade-in {
  2086. animation: fadeIn 1s ease-in-out;
  2087. }
  2088. .fade-enter-from,
  2089. .fade-leave-to {
  2090. opacity: 0;
  2091. }
  2092. .fade-enter-to,
  2093. .fade-leave-from {
  2094. opacity: 1;
  2095. }
  2096. .fade-enter-active,
  2097. .fade-leave-active {
  2098. transition: opacity 1s ease;
  2099. }
  2100. .scienceListBox {
  2101. width: 3160px;
  2102. height: 570px;
  2103. position: absolute;
  2104. top: 0;
  2105. left: 0;
  2106. transition: all 3s linear 0;
  2107. }
  2108. // 标题下列表
  2109. .scienceList {
  2110. width: 790px;
  2111. height: 570px;
  2112. float: left;
  2113. margin-top: 17px;
  2114. >li {
  2115. width: 250px;
  2116. height: 276px;
  2117. float: left;
  2118. margin-right: 20px;
  2119. position: relative;
  2120. img {
  2121. width: 250px;
  2122. height: 220px;
  2123. border-top-left-radius: 40px;
  2124. border-bottom-right-radius: 40px;
  2125. }
  2126. >p {
  2127. height: 50px;
  2128. width: 248px;
  2129. font-family: PingFang SC, PingFang SC;
  2130. font-weight: 600;
  2131. font-size: 18px;
  2132. color: #333333;
  2133. line-height: 24px;
  2134. text-align: left;
  2135. font-style: normal;
  2136. text-transform: none;
  2137. display: -webkit-box;
  2138. -webkit-box-orient: vertical;
  2139. -webkit-line-clamp: 2;
  2140. /* 限制显示的行数 */
  2141. overflow: hidden;
  2142. text-overflow: ellipsis;
  2143. }
  2144. // >p:hover {
  2145. // color: #139602;
  2146. // }
  2147. }
  2148. >li:hover {
  2149. color: #088f04;
  2150. >p:hover {
  2151. a {
  2152. color: #088f04;
  2153. }
  2154. // color: #139602;
  2155. }
  2156. }
  2157. >li:nth-child(3),
  2158. >li:nth-child(6) {
  2159. margin-right: 0;
  2160. }
  2161. >li::before {
  2162. content: "";
  2163. display: inline-block;
  2164. width: 40px;
  2165. height: 20px;
  2166. position: absolute;
  2167. top: 0;
  2168. right: 0;
  2169. background-image: url("../../static/images/Component 209.png");
  2170. }
  2171. }
  2172. .active {
  2173. border-bottom: 3px solid #139602;
  2174. height: 36px;
  2175. display: inline-block;
  2176. }
  2177. .noSelect {
  2178. border-bottom: 3px solid #fff;
  2179. height: 36px;
  2180. display: inline-block;
  2181. }
  2182. </style>